package leetcode;

/**
 * @program: datastructureandalogorithm
 * @description:
 * @author: hmx
 * @create: 2021-10-19 11:43
 **/
public class LeetCode344 {

    /**
     * 此题是非常的简单啊,使用递归或者迭代都可完成此题
     * @param s
     */
    public void reverseString(char[] s) {
        int low = 0;
        int high = s.length - 1;
        while (low < high) {
            char temp = s[low];
            s[low] = s[high];
            s[high] = temp;
            low++;
            high--;
        }
    }



}
